package com.market.controller.wx;

import com.market.bean.MarketCategory;
import com.market.bean.common.BasePageInfo;
import com.market.bean.common.BaseRespVo;
import com.market.bean.vo.wx.CurrentCategoryVo;
import com.market.bean.vo.wx.IndexCategoryVo;
import com.market.service.wx.WxCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 小程序类目
 *
 * @author wh194@foxmail.com
 * @since 2023/01/02 15:41
 */
@RestController
@RequestMapping("wx/catalog")
public class WxCatalogController {
    @Autowired
    WxCatalogService WxCatalogService;
    @GetMapping("current")
    public BaseRespVo current(BaseRespVo info,Integer id){
        CurrentCategoryVo data = WxCatalogService.current(id);
        return BaseRespVo.ok(data);
    }


    @GetMapping("index")
    public BaseRespVo  index(){
        IndexCategoryVo data = WxCatalogService.index();
        return BaseRespVo.ok(data);
    }

}
